package com.sunjob.mrotech.mapper;

import com.sunjob.common.domain.tech.RepairProcess;
import com.sunjob.common.domain.tech.RepairProcessDO;
import com.sunjob.common.domain.tech.TransShape;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.List;
@Mapper
@Component
public interface RepairProcessMapper {
    /** 获得拥有修程工艺的前几个二级构型 */
    List<TransShape> getRepairProcessByLimit3();

    /**
     * 根据二级修程工艺id获得二级修程工艺
     */
    RepairProcess getRepairProcessById(Long repairProcessId);

    /**
     * 根据二级构型id获得二级修程工艺
     */
    RepairProcess getRepairProcessByShapeId(Long shapeId);

    /**
     * 根据二级修程工艺id给某二级构型新增修程工艺
     */
    int insertRepairProcessById(RepairProcessDO repairProcessDO);

    /**
     * 绑定修程工艺通过构型id
     */
    int bindRepairProcessByShapeId(Long shapeId, Long repairProcessId, String updateCreateBy, LocalDateTime updateCreateTime);

    /**
     * 根据二级修程工艺id删除一个二级修程工艺
     */
    int deleteRepairProcessById(Long repairProcessId, Long version, String updateCreateBy, LocalDateTime updateCreateTime);

    /**
     * 修改一个二级修程工艺(小修改)
     */
    int uptateRepairProcessSmall(RepairProcessDO repairProcessDO);
}
